'use strict';

/**
 * 下载记录schema
 */
const mongoose = require('mongoose'), Schema = mongoose.Schema;
const Cons = require('../common/constants');

const downloadModal = new Schema({
    file_name: {type: String}, // 文件名字
    user_type: {type: String},// 文件的类型，员工 或者是访客
    file_type:{type:String}, // 特征或者头像
    log_path: {type: String}, // log路径
    download_statue: {type: Number, default: Cons.DOWNLOAD_INFO_UNZIPPING}, //1:完成，0:进行中
    download_time: {type: Date}, // 上传时间
    download_total: {type: Number}, // 数据总数，比如 进行的5/10,之类的
    download_current: {type: Number},//当前操作数
    download_info: {type: String},//状态信息
    c_id: {type: String}, //创建者
    m_id: {type: String}, //更新者
}, {timestamps: {createdAt: 'c_at', updatedAt: 'm_at'}});

module.exports = mongoose.model('downloadModal', downloadModal, 'download');
